Mind Palace II [PPC]

Mind Palace II

It's time to strain your brains.

URL: nc 212.47.229.1 33002

Recon

The server sends a message that we have to 'decrypt'. We only have to use a ROT-13 substitution cipher. This can be automated with a script, revealing the flag after about 50 or so messages.

Code

import string
import pwn

def rot13(msg):
    a = string.ascii_uppercase
    return ''.join([a[(a.index(c) + 13) % len(a)] for c in msg])

conn = pwn.remote('212.47.229.1', 33002)
conn.recvuntil('Mess')
res = True
while res:
    res = conn.recv()
    if b'{' in res:
        print(res.decode().split('\n')[0])
        break
    msg = res.decode().split('\n')[0].split('  ')[1]
    dec = rot13(msg)
    print(f'{msg} -> {dec}')
    conn.send((dec + '\n').encode())
conn.close()

Flag

FLAG{Y0U_V3RY_F45T3R_CRYPT0GR4PH}